<template>
  <div class="about">
    <h1>所有班级考勤排行</h1>
  </div>

  <table>
    <thead>
      <tr>
        <th>班级</th>
        <th>分数</th>
        <th>详情</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="item in list">
        <td>{{ item.clazzName }}</td>
        <td>{{ item.score }}</td>
        <td><a :href="item.clazzId">查看</a></td>
      </tr>
    </tbody>
  </table>
</template>
<script>

import { mapActions } from 'pinia'
import { useCounsellorStore } from '../../stores/counsellor'
import _ from 'lodash'
export default {
  inject: ['axios'],

  methods: {
    ...mapActions(useCounsellorStore, ['fetchAttendScoreListOfClazzOrderByScoreDesc']),
  },

  async mounted() {
    this.list = await this.fetchAttendScoreListOfClazzOrderByScoreDesc();
  },

  data() {

    return {
      list: []//[{clazzId:1,clazzName:'软件2202',score:100}]
    }
  },
}
</script>


<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}
</style>
